﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SeaBattle.Domain.Abstract.Service;

namespace SeaBattle.Domain.Concrete.Service
{
    public class FakeAccountService : IAccountService
    {
        private static Dictionary<string, decimal> accountRests =
            new Dictionary<string, decimal>()
            {
                {"vasya", 250}
            };
        public decimal GetPlayerBalance(Entities.Player player)
        {
            if (accountRests.ContainsKey(player.Login))
            {
                return accountRests[player.Login];
            }
            throw new Exception("Playe with name " + player.Name + " has not any balance");
        }
    }
}
